// TaskStorage.h
#pragma once
#ifndef TASKSTORAGE_H
#define TASKSTORAGE_H

#include <string>
#include <vector>
#include <sstream>
#include <fstream>
#include "Task.h"


class TaskStorage { 
private:
	std::string _fileName;	
	std::ifstream _fileInput;
	std::ofstream _fileOutput;

	std::vector<Task> _completedTask;
	std::vector<Task> _notCompletedTask;
	Task *_taskPtr;

public:
	TaskStorage();
	TaskStorage(std::string);
	~TaskStorage();

	void loadFile();
	void writeFile(std::vector<Task>);
	void WriteNotCompletedTask();
	void WriteCompletedTask();

	std::vector<Task> returnCompletedTask();
	std::vector<Task> returnNotCompletedTask();

	void updateCompletedTask(std::vector<Task>);
	void updateNotCompletedTask(std::vector<Task>);
	bool isEmptyFile(); 
};

#endif

